//
//  LanguageManger.h
//  AppData
//
//  Created by CPX on 2018/5/23.
//  Copyright © 2018年 CPX. All rights reserved.
//

#import <Foundation/Foundation.h>

extern NSString *const AppLanguageChangedNotification;
extern NSString *const QuranLanguageChangedNotification;

/**
 获取目标语言

 @param p1 key
 @return string
 */
#define TLString(p1) [[LanguageManager defaultManager] getStringForKey:p1]

/**
 语言管理类
 @author yzl
 */
@interface LanguageManager : NSObject

@property (nonatomic,copy) NSString *quranLanguage; ///<古兰经语言 如 en_US
@property (nonatomic,copy) NSString *transLanguage; ///<古兰经翻译语言 如 en_US
@property (nonatomic,copy) NSString *phoneLanguage; ///<古兰经音译语言 如 en_US
@property (nonatomic,copy) NSString *mp3Language;   ///<古兰经mp3语言 如 en_US

@property (nonatomic,copy) NSString *localeLanguage; ///<本地语言 如 en_US
@property (nonatomic,copy) NSString *appLanguage; ///<app 语言如 ar,en,zh
@property (nonatomic,copy) NSString *appLanName; ///<app 语言名称

+ (instancetype)defaultManager;

/**
 获取目标语言
 
 @param key ff
 @return string
 */
- (NSString*)getStringForKey:(NSString*)key;

- (void)saveLanguagesWithTrans:(NSString*)trans pho:(NSString*)pho mp3:(NSString*)mp3;

- (void)resetLocaleLan:(NSString*)localLan;

@end
